package cn.zn.flowTemplate.enums;

public enum ApproveResultEnum {

    /**
     * 不同意
     */
    DISAGREE("0", "不同意"),

    /**
     * 同意
     */
    AGREE("1", "同意");

    private final String value;
    private final String name;

    ApproveResultEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static ApproveResultEnum parse(String value) {
        ApproveResultEnum[] enums = values();

        for (ApproveResultEnum resultEnum : enums) {
            if (resultEnum.getValue().equals(value)) {
                return resultEnum;
            }
        }
        return DISAGREE;
    }

}
